package com.chiaching.pms.controller;

import com.chiaching.framwork.domian.constant.RocketTopic;
import com.chiaching.framwork.utils.RocketUtils;
import org.apache.rocketmq.client.producer.SendResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author jiajing.he
 * @date 2021/5/20 下午2:38
 */
@RestController
@RequestMapping("test")
public class TestController {

    @Autowired
    private RocketUtils rocketMQUtils;

    @RequestMapping("/sendMsg")
    public SendResult sendMqMsg(String msg){
        return rocketMQUtils.send(RocketTopic.SUPER_MALL_COMMON.getName(), "test-common",  msg);
    }

}
